<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets">
<ui:composition template="template/common/template.xhtml">

	<ui:define name="header-content">
		<form action="login.xhtml" method="post">
			<input type="submit" value="SignIn" class="create-account-btn" />
		</form>
	</ui:define>

	<ui:define name="left-panel">
		<div class="centric">
			<div class="container-600">
				<ui:fragment rendered="#{!userModel.validated}">
					<h1>Create Account</h1>
					<h:form class="app-box blue-box innerShadow" method="post">
						<f:validateBean>
							<table cellspacing="0" cellpadding="0" width="100%">
								<col width="35%" style="text-align: right;" />
								<col width="65%" />
								<tr>
									<td><label>#{msg['page.createAccount.fullName']}: *</label></td>
									<td><h:inputText id="fullName"
											value="#{userModel.user.fullName}" required="true"
											class="required" /> <br /> <h:message for="fullName"
											style="color:red" /></td>
								</tr>
								<tr>
									<td><label>#{msg['page.createAccount.email']}: *</label></td>
									<td><h:inputText id="email"
											value="#{userModel.user.email}" required="true"
											class="required " /> <br /> <h:message for="email"
											style="color:red" /></td>
								</tr>
								<tr>
									<td><label>#{msg['page.createAccount.password']}: *</label></td>
									<td><h:inputSecret id="password"
											value="#{userModel.user.password}" class="required"
											required="true" binding="#{passwordComponent}" /> <br /> <h:message
											for="password" style="color:red" /></td>
								</tr>
								<tr>
									<td><label>Confirm Password: *</label></td>
									<td><h:inputSecret id="confirmPassword" class="required"
											required="#{not empty password.value}">
											<f:validator validatorId="confirmPasswordValidator" />
											<f:attribute name="passwordComponent"
												value="#{passwordComponent}" />
										</h:inputSecret> <br /> <h:message for="confirmPassword" style="color:red" />
									</td>
								</tr>
								<tr>
									<td></td>
									<td></td>
								</tr>
								<tr>
									<td><h:commandButton value="Create"
											action="#{userModel.save}" /></td>
									<td></td>
								</tr>
							</table>
						</f:validateBean>
					</h:form>
				</ui:fragment>

				<ui:fragment rendered="#{userModel.validated}">
					<ui:include src="welcome.xhtml" />
				</ui:fragment>
			</div>
		</div>
	</ui:define>

	<ui:define name="right-panel">
		
 	</ui:define>
</ui:composition>
</html>
